home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™ 1987-1994 / MacHack™ '93 / Papers '93 / Macintosh as Internet Server ƒ / inetd / Libraries / DaemonApp / Macros.a < prev    next >
Encoding:
Text File  |  1992-03-17  |  2.1 KB  |  80 lines  |  [TEXT/MPS ]

  1. ;=============================================================================
  2. ; MacApp 68000 Assembly Macros
  3. ;
  4. ; KNOWN LIMITATIONS
  5. ;
  6. ; Copyright © 1984-1992 Apple Computer, Inc.  All rights reserved.
  7. ;
  8. ; when       who    what
  9. ; -------- ---- --------------------------------------------------------------
  10. ; 88.07.28 srf    add header and includes for Macros
  11. ; 88.10.03 srf    change all MacApp command line definitions from "&" defs
  12. ; ----------------------------------------------------------------------------
  13.  
  14.  
  15.  
  16. ;------------------------------------------------------------------------------
  17.     If    qNeedsMC68020 Then
  18.         Machine MC68020
  19.     EndIf
  20.     If    qNeedsMC68030 Then
  21.         Machine MC68030
  22.     EndIf
  23.     If    qNeedsFPU Then
  24.         MC68881
  25.     EndIf
  26. ;------------------------------------------------------------------------------
  27. ; set Debug for ProgStrucMacs.a to match qNames
  28.       Debug: SET qNames
  29.       if not qNames then
  30.       LinkAll: SET qNames
  31.       EndIf
  32. ;------------------------------------------------------------------------------
  33.  
  34.     Macro    
  35.     Head
  36.         If    qNames Then
  37.             Link    A6,#0        ; These two instructions form a slow no-op
  38.             Move.L    (SP)+,A6
  39.         EndIf
  40.     EndM
  41.  
  42. ;------------------------------------------------------------------------------
  43.  
  44.     Macro    
  45.     Procnam &theName
  46.     If    qNames Then
  47.     
  48.         String Asis
  49.         
  50.         LCLC        &DbgTemp
  51.         LCLC        &DbgName                            ; name to generate for MacsBug
  52.         
  53.         &DbgTemp: SETC    &theName                        ; Generate new type symbols
  54.         IF &Len(&theName) < 32 THEN                     ; If module name < 32 chars
  55.             IF &Len(&theName) // 2 = 0 THEN             ; Add space if even so that...
  56.                 &DbgTemp: SETC &Concat(&theName,' ')    ; string length plus length byte...
  57.             ENDIF                                        ; will align to word boundary
  58.         &DbgName: SETC &Concat(&Chr($80 + &Len(&theName)), &DbgTemp)
  59.         ELSE                                            ; Length is greater than 32 characters
  60.             IF &Len(&theName) // 2 = 1 THEN             ; Add space if length is odd
  61.                 &DbgTemp: SETC &Concat(&theName,' ')
  62.             ENDIF
  63.         &DbgName: SETC &Concat(&Chr($80), &Chr(&Len(&theName)), &DbgTemp)
  64.         ENDIF
  65.         
  66.         DC.B        '&DbgName'
  67.     EndIf
  68.     EndM
  69.  
  70. ;------------------------------------------------------------------------------
  71.  
  72.     Macro    
  73.     Tail &theName
  74.         If    qNames Then
  75.             Unlk    A6
  76.             Rts
  77.             PROCNAM &theName
  78.         EndIf
  79.     EndM
  80.